import React, { Component } from 'react';

class Bp extends Component {
  render() {
    return (
      <div>
        <p>请选择或者禁用英雄</p>
        <ul>
          {
            this.props.list.map((item, index) => {
              return (
                <li key={index}>
                  <span>{item.name}</span>
                  <button onClick={()=>this.props.ban(index)}>禁用</button>
                  <button onClick={()=>this.props.pick(index)}>选用</button>
                </li>
              )
            })
          }
        </ul>
      </div>
    );
  }
}

export default Bp;
